package com.renjiyue.crud;

public class UserServiceProxy implements UserService{
    private UserServiceImpI userServiceImpI;

    public void setUserServiceImpI(UserServiceImpI userServiceImpI) {
        this.userServiceImpI = userServiceImpI;
    }

    @Override
    public void add() {
        log("add");
        userServiceImpI.add();
    }

    @Override
    public void delete() {
        log("delete");
        userServiceImpI.delete();
    }

    @Override
    public void update() {
        log("updata");
        userServiceImpI.update();
    }

    @Override
    public void query() {
        log("query");
        userServiceImpI.query();
    }
    public void log(String msg){
        System.out.println("执行了"+msg+"方法");
    }
}
